package com.youngjun.core.controller;import com.youngjun.common.constant.BusinessExceptionConstant;import com.youngjun.common.controller.support.BaseController;import com.youngjun.common.controller.support.BusinessException;import com.youngjun.security.service.CaptchaService;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.web.bind.annotation.*;import java.io.IOException;@RestController@RequestMapping("captcha")public class CaptchaController implements BaseController {    @Autowired    CaptchaService captchaService;    @RequestMapping(method = RequestMethod.GET)    public void get(){        try {            captchaService.getCode(getResponse().getOutputStream());        } catch (IOException e) {            throw new BusinessException(BusinessExceptionConstant.CANNOT_FOUND_OBJECT);        }    }}